3.2.6 \(\int \frac {\sin (a+\frac {b}{x})}{x} \, dx\) [106]

Optimal. Leaf size=21 \[ -\text {Ci}\left (\frac {b}{x}\right ) \sin (a)-\cos (a) \text {Si}\left (\frac {b}{x}\right ) \]

[Out]

-cos(a)*Si(b/x)-Ci(b/x)*sin(a)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3458, 3457, 3456} \begin {gather*} \sin (a) \left (-\text {CosIntegral}\left (\frac {b}{x}\right )\right )-\cos (a) \text {Si}\left (\frac {b}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[a + b/x]/x,x]

[Out]

-(CosIntegral[b/x]*Sin[a]) - Cos[a]*SinIntegral[b/x]

Rule 3456

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3457

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3458

Int[Sin[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Sin[c], Int[Cos[d*x^n]/x, x], x] + Dist[Cos[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rubi steps

\begin {align*} \int \frac {\sin \left (a+\frac {b}{x}\right )}{x} \, dx &=\cos (a) \int \frac {\sin \left (\frac {b}{x}\right )}{x} \, dx+\sin (a) \int \frac {\cos \left (\frac {b}{x}\right )}{x} \, dx\\ &=-\text {Ci}\left (\frac {b}{x}\right ) \sin (a)-\cos (a) \text {Si}\left (\frac {b}{x}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 21, normalized size = 1.00 \begin {gather*} -\text {Ci}\left (\frac {b}{x}\right ) \sin (a)-\cos (a) \text {Si}\left (\frac {b}{x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b/x]/x,x]

[Out]

-(CosIntegral[b/x]*Sin[a]) - Cos[a]*SinIntegral[b/x]

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 22, normalized size = 1.05

method result size
derivativedivides \(-\cos \left (a \right ) \sinIntegral \left (\frac {b}{x}\right )-\cosineIntegral \left (\frac {b}{x}\right ) \sin \left (a \right )\) \(22\)
default \(-\cos \left (a \right ) \sinIntegral \left (\frac {b}{x}\right )-\cosineIntegral \left (\frac {b}{x}\right ) \sin \left (a \right )\) \(22\)
risch \(-\frac {i {\mathrm e}^{i a} \expIntegral \left (1, -\frac {i b}{x}\right )}{2}+\frac {{\mathrm e}^{-i a} \pi \,\mathrm {csgn}\left (\frac {b}{x}\right )}{2}-{\mathrm e}^{-i a} \sinIntegral \left (\frac {b}{x}\right )+\frac {i \expIntegral \left (1, -\frac {i b}{x}\right ) {\mathrm e}^{-i a}}{2}\) \(63\)
meijerg \(-\cos \left (a \right ) \sinIntegral \left (\frac {b}{x}\right )-\frac {\sqrt {\pi }\, \sin \left (a \right ) \left (\frac {2 \gamma -2 \ln \left (x \right )+\ln \left (b^{2}\right )}{\sqrt {\pi }}-\frac {2 \gamma }{\sqrt {\pi }}-\frac {2 \ln \left (2\right )}{\sqrt {\pi }}-\frac {2 \ln \left (\frac {b}{2 x}\right )}{\sqrt {\pi }}+\frac {2 \cosineIntegral \left (\frac {b}{x}\right )}{\sqrt {\pi }}\right )}{2}\) \(72\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a+b/x)/x,x,method=_RETURNVERBOSE)

[Out]

-cos(a)*Si(b/x)-Ci(b/x)*sin(a)

________________________________________________________________________________________

Maxima [C] Result contains complex when optimal does not.
time = 0.33, size = 43, normalized size = 2.05 \begin {gather*} \frac {1}{2} \, {\left (i \, {\rm Ei}\left (\frac {i \, b}{x}\right ) - i \, {\rm Ei}\left (-\frac {i \, b}{x}\right )\right )} \cos \left (a\right ) - \frac {1}{2} \, {\left ({\rm Ei}\left (\frac {i \, b}{x}\right ) + {\rm Ei}\left (-\frac {i \, b}{x}\right )\right )} \sin \left (a\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b/x)/x,x, algorithm="maxima")

[Out]

1/2*(I*Ei(I*b/x) - I*Ei(-I*b/x))*cos(a) - 1/2*(Ei(I*b/x) + Ei(-I*b/x))*sin(a)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 29, normalized size = 1.38 \begin {gather*} -\frac {1}{2} \, {\left (\operatorname {Ci}\left (\frac {b}{x}\right ) + \operatorname {Ci}\left (-\frac {b}{x}\right )\right )} \sin \left (a\right ) - \cos \left (a\right ) \operatorname {Si}\left (\frac {b}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b/x)/x,x, algorithm="fricas")

[Out]

-1/2*(cos_integral(b/x) + cos_integral(-b/x))*sin(a) - cos(a)*sin_integral(b/x)

________________________________________________________________________________________

Sympy [A]
time = 0.61, size = 17, normalized size = 0.81 \begin {gather*} - \sin {\left (a \right )} \operatorname {Ci}{\left (\frac {b}{x} \right )} - \cos {\left (a \right )} \operatorname {Si}{\left (\frac {b}{x} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b/x)/x,x)

[Out]

-sin(a)*Ci(b/x) - cos(a)*Si(b/x)

________________________________________________________________________________________

Giac [A]
time = 6.51, size = 42, normalized size = 2.00 \begin {gather*} -\frac {b \operatorname {Ci}\left (-a + \frac {a x + b}{x}\right ) \sin \left (a\right ) - b \cos \left (a\right ) \operatorname {Si}\left (a - \frac {a x + b}{x}\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(a+b/x)/x,x, algorithm="giac")

[Out]

-(b*cos_integral(-a + (a*x + b)/x)*sin(a) - b*cos(a)*sin_integral(a - (a*x + b)/x))/b

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.05 \begin {gather*} -\sin \left (a\right )\,\mathrm {cosint}\left (\frac {b}{x}\right )-\cos \left (a\right )\,\mathrm {sinint}\left (\frac {b}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b/x)/x,x)

[Out]

- sin(a)*cosint(b/x) - cos(a)*sinint(b/x)

________________________________________________________________________________________